package jin.si.service;

import jin.si.pojo.JsRegion;
import jin.si.pojo.JsUserAddress;
import jin.si.pojo.JsUserCoupon;
import jin.si.pojo.JsUserOrderShop;

import java.util.List;

/**
 * ClassName:ShoppingService
 * Package:jin.si.service
 * Description:
 *
 * @Date:2022/4/8 14:12
 * @Author: XJR
 */
public interface ShoppingService {
    //加入购物车
    public Boolean addShopOrder(JsUserOrderShop jsUserOrderShop);
    //查看是否有默认地址
    public List<JsUserAddress> selectUserDefaultCity(Integer userId,Integer isDefault);
    //查询可选择的地址
    public List<JsRegion> selectJsRegion(Integer parentCode);
    //查询可用以及不可用优惠券
    public List<JsUserCoupon> selectJsCouponYesOrNo(JsUserCoupon jsUserCoupon);
    //添加用户的收货地址
    public Boolean addUserAddress(JsUserAddress jsUserAddress);
    //查询指定用户的所有地址（默认和非默认）
    public List<JsUserAddress> selectJsAddressAll(Integer userId);
    //将用户的所有地址改成非默认的
    public Boolean updateUserNoDefault(Integer userId,Integer isDefaultt);
    //修改用户的默认地址
    public Boolean updateUserIsDefault(Integer isDefault,Integer addressId);
}
